<template>
    <view class="content">
        <!-- 销售报表 -->
        <sale ref="sale" v-if="tab == 1"></sale>
        <statistics ref="statistics" v-else></statistics>
    </view>
</template>

<script>
import sale from "../../components/businessDistrict/sale/Sale.vue";
import statistics from "../../components/businessDistrict/statistics/statistics.vue";
import staticConst from "../../js/const/StaticConst.js";

export default {
    components: {
        sale,
        statistics,
    },
    data() {
        return {
            activeName: "1",
            curPage: staticConst.TCSQ_BB,
            curIndex: 1, //1,
            actType: 0, // 0:新增产品 1：编辑产品
            isNotData: false, // 没有数据
            isClickUpDownBtn: false,
            mdGd: staticConst.TCSQ_TAB, //模块
            tab: "1",
        };
    },
    onLoad(data) {
        this.tab = data.tab;
    },

    onShow() {
        this.addEvent();
    },

    onHide() {
        this.removeEvent();
    },

    onUnload() {
        this.removeEvent();
    },

    onReady() {
        if (this.tab == 1) {
            this.$refs.sale.initData();
        } else {
            this.$refs.statistics.initData();
        }
    },

    methods: {
        handleClick() {},
        /****显示上传产品列表窗口****/
        showUploadGdsWin() {
            // this.$refs.uploadGoodsFile.show("show");
        },

        /*****显示上传下载菜单****/
        upDownClick() {
            this.isClickUpDownBtn = true;
            this.$refs.upAndDownLoadMenu.show();
        },

        removeEvent() {},

        addEvent() {},
    },
};
</script>
<style lang="scss">
.content {
    display: flex;
    justify-content: flex-start;
    min-width: 820px;
    height: 100%;
    position: relative;
    ::v-deep.el-tabs {
        width: 100%;
        .el-tabs__header {
            margin-bottom: 0;
        }
        .el-tabs__nav-scroll {
            padding: 0 10px;
            .el-tabs__item {
                font-size: 18px;
            }
        }
        .el-tabs__nav-wrap::after {
            background: none;
        }
    }
}
</style>